package com.yf1706.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yf1706.bean.CheckDetail;
import com.yf1706.bean.CheckMonthDetail;
import com.yf1706.dao.jpa.ICheckDetailsJDAO;
import com.yf1706.dao.mybatis.CheckFlushCardMDAO;

@Service
@Transactional(rollbackFor=Exception.class)
public class CheckDetailsService {
	@Autowired
	private CheckFlushCardMDAO cdMdao;
	@Autowired
	private ICheckDetailsJDAO cdJdao;
	public List<CheckDetail> getCheckDetailsList(){
		return cdMdao.CheckDetails();
	}
	public List<CheckDetail> serchCheckDetailsList(int id){
		return cdMdao.serchCheckDetails(id);
	}
	public void deleteCheckDetail(int id){
		cdJdao.deleteById(id);
	}
	public void addCheckcards(CheckDetail cd) {
		cdJdao.save(cd);
	}
}
